<script type="text/javascript" src="../../../jquery.min.js"></script>
<script type="text/javascript" src="../../../pageoffice.js" id="po_js_main"></script>
<style>
	.btn-team button {
		background-color: #4e9ee9;
		color: #ffffff;
		border: none;
		width: 100px;
	}
</style>
<body>
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
	<ul class="layui-tab-title">
		<li class="layui-this">提出资料 </li>
	</ul>
	<div class="layui-tab-content">
		<div class="layui-tab-item layui-show">
			<div style="padding-top:10px" id="div_content">
				<div class="row row-right-content">
					<div class="col-sm-12">
						<input type="hidden" name="type" id="type" value="${obj.type}">
						<button class="btn btn-default bag" onclick="batchDownloadSbtz()">打包下载</button>
						<div id="view"  style="height: 600px;">
							<div class="layui-form table-info" style="width: 100%;height: auto;overflow:auto; position: relative;margin: 0;" data-spy="scroll" data-target="#navbar-example" data-offset="0" >
								<table class="table table-bordered">
									<tbody>
									<tr>
										<th>文件名称</th>
										<th></th>
										<th>操作</th>
									</tr>
                                    <#if(obj.list.~ size>0){#>
                                    <#for(file in obj.list){#>
									<tr>
										<td>${file.name}</td>
										<td></td>
										<td class="btn-operate">
                                            <button type="button" class="btn btn-detail"  onclick="downloadFile('${file.id}')">下载</button>
                                        </td>
									</tr>
                                    <#}#>
                                    <#}#>
                                    </tbody>
                                </table>
                            </div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="layui-tab-item"></div>
	</div>
</div>
<script>
	var type = $("#type").val();
	function batchDownloadSbtz(){
        var url = base + "/projectCenter/tczl/downAllSgtFile/" + type;
        window.open(url,"_self");
        return false;
	}
    function downloadFile(fileId) {
        var url = base + "/projectCenter/tczl/downSgtFile/" + fileId+"/"+project_id;
        window.open(url,"_self");
        return false;
    }
</script>
<script type="text/javascript" src="${base}/js/development/projectcenter/tczl/index.js"></script>